#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
#define rep(i, a, b) for (int i = (a); i <= (b); i++)
#define per(i, a, b) for (int i = (a); i >= (b); i--)
#define endl '\n'
const int N = 510;
const int MX = 505;

int a[N], b[N], c[N];

void init(string& s, int a[N]) {
  for (int i = 0, j = s.size() - 1; i < s.size(); i++, j--) a[i] = s[j] - '0';
}
void add(int a[N], int b[N], int c[N]) {
  int carry = 0;
  rep(i, 0, MX) {
    c[i] = a[i] + b[i] + carry;
    if (c[i] > 9)
      c[i] = c[i] % 10, carry = 1;
    else
      carry = 0;
  }
}
void output(int a[N]) {
  int h = MX;
  while (h > 0 && !a[h]) h--;
  per(i, h, 0) cout << a[i];
}
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  string s;
  cin >> s;
  init(s, a);
  cin >> s;
  init(s, b);
  add(a, b, c);
  output(c);
  return 0;
}